package com.studyinghome.controller;

import com.studyinghome.aop.RateLimit;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Leslie (panxiang_work@163.com)
 * @website https://www.studyinghome.com
 * @create 2023-04-09 22:50
 */
@RestController
public class LimitController {

    @GetMapping("/requestLimit")
    @RateLimit(name = "request")
    public String limitRequest() {
        return "success";
    }

    @GetMapping("/limitIp")
    @RateLimit(name = "limitIP")
    public String limitIp() {
        return "success";
    }
}
